<template>
<h1>隐藏显示指令</h1>
  <p v-if="false">张三</p>
  <p v-if="true">李四</p>
  <hr>
  <p v-show="true">小红</p>
  <p v-show="false">小绿</p>
  <hr>
  <p v-if="isShow">太阳</p>
  <p v-else>月亮</p>
</template>


<script setup>
import {ref} from "vue";

const isShow = ref(true);
</script>


<style scoped>

</style>